import React from "react";
import Grandchildren from "./grandchildren";
class Son2 extends React.Component {
  // constructor(props) {
  //   super(props);
  // }
  render() {
    // this.props.fn1 && this.props.fn1();
    return (
      <>
        <div>{this.props.propSon2Msg}</div>
        {this.props.children}
        <hr />
        子组件引入子组件
        <Grandchildren></Grandchildren>
        <hr />
        <br />
        <div>
          高阶组件传递的数据
          <div>propHocMsg：{this.props.a}</div>
        </div>
      </>
    );
  }
  sayHello = () => {
    console.log("son2组件 say  hello");
  };
}

export default Son2;
